import type { App } from 'vue';

export default {
  install(app: App) {
    app.directive('scroll', {
      mounted(el, binding) {
        el.addEventListener('scroll', binding.value);
      },
      unmounted(el, binding) {
        el.removeEventListener('scroll', binding.value);
      },
    });
  },
};
